package com.icehand.demo.service.old;

import com.icehand.demo.dto.OrderDTO;
import com.icehand.demo.exception.BizException;
import com.icehand.demo.service.OrderService;
import org.springframework.stereotype.Service;

@Service("orderServiceV1")
public class OrderServiceImplV1 implements OrderService {
    @Override
    public String handle(OrderDTO dto) {
        if(1 == dto.getType()) {
            return "普通订单";
        } else if(2 == dto.getType()) {
            return "团购订单";
        } else if (3 == dto.getType()) {
            return "秒杀订单";
        }

        throw new BizException(1001,"订单类型暂不支持");
    }
}
